package com.csun.cmny.provider.model.dto.pay;

import com.csun.cmny.provider.validator.OnlinePayParamValid;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * @Auther: chisj chisj@foxmal.com
 * @Date: 2020-05-25 17:25
 * @Description:
 */
@Data
public class OnlinePayParam {

    private String body; // 备注
    @NotNull(message="支付金额不能为空",
            groups={OnlinePayParamValid.class})
    private BigDecimal totalAmount; // 金额
    private String token; // 用户认证令牌
    @NotNull(message="支付方式不能为空",
            groups={OnlinePayParamValid.class})
    @Range(min=0, max=3, message="支付方式不支持",
            groups={OnlinePayParamValid.class})
    private Integer payType;

}
